#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
char* name = "text.txt";
int main()
{
    FILE* ptr = fopen(name, "w");
    for (int i = 0; i <= 1000; i++)
    {
        fprintf(ptr, "%d", i);
    }
    return 0;
}